<?php
$registry = Zend_Registry::getInstance();
$translator = $registry->get('Zend_Translate');
?>
<?php if ($this->pageCount): ?>

<div class="paginationControl">
<div class="paginationControlLeft"><input name="back" id="back"
	type="button" onclick="javascript: history.go(-1);"
	value="<?php echo $this->translate("Back");?>" /></div>
<div class="paginationControlMiddle"><?= $this->firstItemNumber; ?> - <?= $this->lastItemNumber; ?>
/ <?= $this->totalItemCount; ?> <!-- First page link --> <?php if (isset($this->previous)): ?>
<?php $this->params["page"] = $this->first;?> <a
	href="<?= $this->url($this->params); ?>"> <?php echo $translator->translate("First");?>
</a> | <?php else: ?> <span class="disabled"><?php echo $translator->translate("First");?></span>
| <?php endif; ?> <!-- Previous page link --> <?php if (isset($this->previous)): ?>
<?php $this->params["page"] = $this->previous;?> <a
	href="<?= $this->url($this->params); ?>"> <?php echo $translator->translate("Previous");?>
</a> | <?php else: ?> <span class="disabled"><?php echo $translator->translate("Previous");?></span>
| <?php endif; ?> <!-- Next page link --> <?php if (isset($this->next)): ?>
<?php $this->params["page"] = $this->next;?> <a
	href="<?= $this->url($this->params); ?>"> <?php echo $translator->translate("Next");?>
</a> | <?php else: ?> <span class="disabled"><?php echo $translator->translate("Next");?></span>
| <?php endif; ?> <!-- Last page link --> <?php if (isset($this->next)): ?>
<?php $this->params["page"] = $this->last;?> <a
	href="<?= $this->url($this->params); ?>"> <?php echo $translator->translate("Last");?>
</a> <?php else: ?> <span class="disabled"><?php echo $translator->translate("Last");?></span>
<?php endif; ?></div>
<div class="paginationControlRight"><select
	id="paginationDropdownControl" size="1">
	<?php foreach ($this->pagesInRange as $page): ?>
	<?php $selected = ($page == $this->current) ? ' selected="selected"' : ''; ?>
	<?php $this->params["page"] = $page;?>
	<option value="<?= $this->url($this->params); ?>" <?= $selected ?>><?= $page; ?>
	</option>
	<?php endforeach; ?>
</select></div>
</div>
	<?php endif; ?>
<script type="text/javascript">
$("select#paginationDropdownControl").change(function() {
    window.location = this.options[this.selectedIndex].value;
})
</script>

